SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author:		Elliot Franford
-- Create date: June 23, 2009
-- Description:	Creates a new Post
-- =============================================
CREATE PROCEDURE spCreatePost
@Title varchar(50),
@Text varchar,
@PostTime datetime,
@FK_ReplyToPostID bigint,
@FK_TopicID bigint,
@FK_UserID bigint
AS
BEGIN
	-- SET NOCOUNT ON added to prevent extra result sets from
	-- interfering with SELECT statements.
	SET NOCOUNT ON;

INSERT INTO Post
           ([Title]
           ,[Text]
           ,[PostTime]
           ,[FK_ReplyToPostID]
           ,[FK_TopicID]
           ,[FK_UserID])
     VALUES
           (
			@Title,
			@Text,
			@PostTime,
			@FK_ReplyToPostID,
			@FK_TopicID,
			@FK_UserID
			)
END
GO
